<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<%@page import="es.ats.codington.festival.domain.Visitor"%>
<html>

<head>

<link rel="Stylesheet" type="text/css" href="css/Stylesheet.css">

</head>

<body>


<h1></h1>
<% Visitor v=(Visitor) session.getAttribute("visitor");
boolean isAdmin= v.getIsAdmin();%>

<ul id="menu" align=center>

 <li><form id=NoBox action="vieweventsofuser.htm" method="post"><input id="NoBox" type="submit" name="MyPortal" value="My Portal" /></form></li>
 <li><form id=NoBox action="UpdateVisitorPage.htm" method="post"><input id="NoBox" type="submit" name="Update Personal Data" value="Update Personal Data" /></form></li>
 <li><form id=NoBox action="UpdatePasswordPage.htm" method="post"><input id="NoBox" type="submit" name="Change Password" value="Change Password" /></form></li>
 <% if(isAdmin==true){%>
<li><form id=NoBox action="EventRegistrationPage.htm" method="post"><input id="NoBox" type="submit" name="New Event" value="New Event" /></form></li>
<% }%>
 <li><form id=NoBox action="ShowAllEvents.htm" method="post"><input id="NoBox" type="submit" name="Events" value="Events" /></form></li>
 <li><form id=NoBox action="LogOut.htm" method="post"><input id="NoBox" type="submit" name="LogOut" value="Log Out" /></form></li>
</ul>
               
<table>
<tr height="200" align="left">
<td>
<div id="places" align="left" text-align="left">
  <p id="placetitle">Places</p>
  <ul>

  	<li><b><ins ><a >North</a></b></ins></li>
	<li>	<form  id="places" action="ShowEventsByPlace.htm" method="post">
			<input type="hidden" name="place" value="Stadium">
			<input id="places" type="submit" name="Stadium" value="Stadium" />
			</form></li>
	<li>	<form  id="places" action="ShowEventsByPlace.htm" method="post">
			<input type="hidden" name="place" value="Theater">
			<input id="places" type="submit" name="Theater" value="Theater" />
			</form></li>
	<li>	<form  id="places" action="ShowEventsByPlace.htm" method="post">
			<input type="hidden" name="place" value="Museum">
			<input id="places" type="submit" name="Museum" value="Museum" />
			</form></li>
	<li>	<form  id="places" action="ShowEventsByPlace.htm" method="post">
			<input type="hidden" name="place" value="Large Business">
			<input id="places" type="submit" name="Large Business" value="Large Business" />
			</form></li>
	<li></li>
	<li><b><ins><a>South</a></b></ins></li>
	<li >	<form  id="places" action="ShowEventsByPlace.htm" method="post">
			<input type="hidden" name="place" value="Zoo">
			<input id="places" type="submit" name="Zoo" value="Zoo" />
			</form></li>
	<li >	<form  id="places" action="ShowEventsByPlace.htm" method="post">
			<input type="hidden" name="place" value="Park">
			<input id="places" type="submit" name="Park" value="Park" />
			</form></li>
	<li >	<form  id="places" action="ShowEventsByPlace.htm" method="post">
			<input type="hidden" name="place" value="Traditional Market">
			<input id="places" type="submit" name="Traditional Market" value="Traditional Market" />
			</form></li>
	<li >	<form  id="places" action="ShowEventsByPlace.htm" method="post">
			<input type="hidden" name="place" value="Tourist Attraction">
			<input id="places" type="submit" name="Tourist Attraction" value="Tourist Attraction" />
			</form></li>
  </ul>
</div>
</td>
<td>

<form action="EventRegistration.htm" method="post">

<h2>Festival Registration System</h2>

<h3>New Event Registration Page</h3>

<table align=center>
    <tr>
		<td><label for="eventname">Event Name: </label></td>
		<td><input type="text" name="eventname" id="eventname" placeholder="Enter event name" required="required" autofocus="autofocus" minlength="1" maxlength="45"></td>
	</tr>
	
	<tr>
		<td><label for="description">Event Description: </label></td>
		<td><input type="text" name="description" id="description" placeholder="Enter description" required="required" autofocus="autofocus" minlength="1" maxlength="45"></td>
     </tr>
	 
	 
    <tr>
    	<td><label for="place">Place: </label></td>
		<td><select id="place" name="place" required="required" autofocus="autofocus">
				<option value="" selected="selected">- Selected -</option>
   				<option value="Stadium">Stadium</option>
   				<option value="Museum">Museum</option>
  				<option value="Theater">Theater</option>
   				<option value="Zoo">Zoo</option>
   				<option value="Traditional Market">Traditional Market</option>
   				<option value="Park">Park</option>
   				<option value="Tourist Attraction">Tourist Attraction</option>
   				<option value="Large Business">Large Business</option>
			</select></td>
	</tr>
	 
    <tr>

		<td><label for="duration">Duration (min.): </label></td>
		<td><input name="duration" required="required" type="text" id="duration" placeholder="Enter duration" pattern="[0-9]{1,}" required="required" autofocus="autofocus" minlength="1" maxlength="45"></td>
	</tr>


	<tr>

		<td><label for="eventtype">Event Type: </label></td>
		<td><input type="text" name="eventtype" id="eventtype" placeholder="Enter type" required="required" autofocus="autofocus" minlength="1" maxlength="45" /></td>

	</tr>
	<tr>
		<td><label for="totaltickets">Total Tickets: </label></td>
		<td><input type="text" name="totaltickets" id="totaltickets" placeholder="Enter total tickets" required="required" autofocus="autofocus" pattern="[0-9]{1,}" title="Please enter a positive number" /></td>

	</tr>

<tr>
<td></td><td></td>
</tr>



<tr>
<td></td><td><input type="submit" name="Accept" value="Accept" />
<button type="reset">Cancel</button>
</td>
</tr>

</table>

</form>
</td>
</tr>
</table>

<% String error = (String) request.getAttribute("error"); %>

<%if(error!=null){ %>
<script> 
alert ("<%=error%>");
</script>

<% request.setAttribute("error",null);} %>

</body>
</html>
